import urllib.request, urllib.error


url = "https://movie.douban.com/"

headers = {
    "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Mobile Safari/537.36 Edg/87.0.664.60"
}

req = urllib.request.Request(url=url, headers=headers)
response = urllib.request.urlopen(req)
print(response.getcode())
print(response.read().decode("utf-8"))
